package com.naiterui.ehp.bs.cms.modules.agent.vo;

import com.naiterui.ehp.bs.cms.modules.agent.entity.AgNoticeMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * @author yiren
 * @since 2022/2/10
 */
@Data
@Builder
public class NoticeItemVO {
	@ApiModelProperty(value = "消息ID")
	private Long id;
	@ApiModelProperty(value = "标题")
	private String title;
	@ApiModelProperty(value = "编辑内容")
	private String content;

	public static NoticeItemVO of(AgNoticeMessage message) {
		return NoticeItemVO.builder().id(message.getId()).title(message.getTitle()).content(message.getContent()).build();
	}
}
